﻿@model WebUI.Models.EmailTemplateCreateViewModel
@{
    ViewBag.Title = "Create a New Email Template";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<div class="nav">
    <a href="@Url.Action("Index")">Admin Home</a>
    <a href="@Url.Action("EmailTemplate")">Email template list</a>
</div>
<h2>Create a New Email Template</h2>

<div class="adminSection eetl">
    @*keep the same url pattern with HttpGet, that's why keey EmailTemplateID here*@
    @using (Html.BeginForm("createEmailTemplate", "admin", FormMethod.Post))
    {
        <div class="fl left">Name</div>
        <div class="fl right">
            @Html.TextBoxFor(model => model.EmailTemplate.EmailTemplateName)
            @Html.ValidationMessageFor(model => model.EmailTemplate.EmailTemplateName)
            @*@Html.TextBox("EmailTemplateName", Model.EmailTemplate.EmailTemplateName)*@
        </div>
        <div class="clear"></div>
        <div class="fl left">Subject</div>
        <div class="fl right">
            @Html.TextBoxFor(model => model.EmailTemplate.Subject)
            @Html.ValidationMessageFor(model => model.EmailTemplate.Subject)
            @*@Html.TextBox("Subject", Model.EmailTemplate.Subject)*@
         </div>
        <div class="clear"></div>
        <div class="fl left">Body parameter</div>
        <div class="fl right">
            @Html.TextBoxFor(model => model.EmailTemplate.BodyParameter)
            @*@Html.TextBox("BodyParameter", Model.EmailTemplate.BodyParameter)*@
        </div>
        <div class="clear"></div>
        <div class="fl left">Body</div>
        <div class="fl right">
            @Html.TextAreaFor(model => model.EmailTemplate.Body)
            @*@Html.TextArea("Body", Model.EmailTemplate.Body)*@
        </div>
        <div class="spacer"></div>
        <div class="clear"></div>
        <div class="fl left">&nbsp;</div>
        <div class="fl right">
            <input class="blue-submit" type="submit" name="submit" id="submit" value="Create" />
        </div>
        <div class="clear"></div>
    }
</div>
